<?php
class Model_Payroll_Superpaymethod extends Zend_Db_Table_Abstract {

	protected $_name = 'super_payment_method';
	
	public function getSuperpaymethod( $idMethod){
		
		$row = $this->fetchRow("`id_method` = ". $idMethod);
		if(!$row) return false;
		return $row->toArray();		
		
		}
		
	public function addSuperpaymethod( $titleMethod){
		
		$data = array(
			
         "title_method" =>  $titleMethod 
	
			);
		$this->insert($data);
		
		}
		
	public function updateSuperpaymethod(  $idMethod ,  $titleMethod){
		$data = array(
			
         "title_method" =>  $titleMethod 
	
			);
			
		$this->update($data,"`id_method` = ". $idMethod);
		}
		
	public function deleteSuperpaymethod( $idMethod){
		
		$this->delete("`id_method` = ". $idMethod);
		
		}	
	
	public function listAll(){
		
		$rows =$this->fetchAll("1","id_method ASC ");
		if(!$rows) return false;
		return $rows->toArray();			
		
		}	
}


?>